from server import db
from sqlalchemy import Column, String
from sqlalchemy.dialects.mysql import BIGINT
from server.model import BaseOrm


# 系统日志
class SysLog(BaseOrm):
    __tablename__ = 'sys_log'
    user_id = Column(BIGINT(20), nullable=False, server_default='0', comment="用户id ")
    username = Column(String(64), nullable=False, server_default='', comment="用户名 ")
    operation = Column(String(64), nullable=False, server_default='', comment="用户操作 ")
    method = Column(String(64), nullable=False, server_default='', comment="请求方法 ")
    params = Column(String(255), nullable=False, server_default='', comment="请求参数 ")


db.create_all()
